#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "game.h"
#include <QPainter>
#include <QLabel>

namespace Ui {
  class MainWindow;
}

class MainWindow : public QMainWindow
{
  Q_OBJECT
  
public:
  explicit MainWindow(QWidget *parent = 0);
  ~MainWindow();

  void hideMain();
  
  void configureBackground();
  void configureScore();
  void toggleRunning();
  void wipe();
  void buildPixVec();
  void highScores(bool gameOver);
  int getDifficulty() {return difficulty;}
  void buildQLabelQPixmap();
  void updateLabelPositions();
  void startNewLevel();
  void removeDots();
  void returnToHome();
private slots:
  void on_btnNewGame_clicked();
  void timerHit();
  void toggleGameRunning() {gameRunning = !gameRunning;}

  void on_btnHighScores_clicked();

  void on_btnLoad_clicked();

private:
  Ui::MainWindow *ui;
  Game *game;
  vector<QLabel *> labels;
  vector<QPixmap *> pixmaps;
  QLabel *background;
  QLabel *score;
  QTimer *timer;
  bool gameRunning;
  QString playerName;
  int difficulty;

protected:

  void keyPressEvent(QKeyEvent *kEvent);

};

#endif // MAINWINDOW_H
